<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.prime.com.tr/ui">

    <body>

        <ui:composition template="./../../Template/generalTemplate.xhtml">



            <ui:define name="content">
                <h:form>
                    <p:growl id="growl" showDetail="true" /> 
                    <p:panel header="Create Incoming Bill Record" style="height:495px;">
                        <div style="margin-top:50px;margin-right:50px;margin-left:350px;">
                        <h:panelGrid columns="2" cellpadding="5">
                            <h:outputText value="Incoming Bill Id: "/>
                            <h:inputText value="#{createIncomingBillRecordManagedBean.incomingBillEntity.billId}"/>
                            <h:outputText value="Supplier:"/>
                            <h:selectOneMenu  value="#{createIncomingBillRecordManagedBean.incomingBillEntity.supplierName}" style="width:160px;">  
                             <f:selectItems value="#{createIncomingBillRecordManagedBean.getSupplierList()}" />
                            </h:selectOneMenu>
                            <h:outputText value="Purchase Order Id:"/>
                            <h:selectOneMenu  value="#{createIncomingBillRecordManagedBean.purchasingOrderId}" style="width:160px;">  
                             <f:selectItems value="#{createIncomingBillRecordManagedBean.getAllPurchasingOrderId()}" />
                            </h:selectOneMenu>
                           
                            <h:outputText value="Total Due: "/>
                            <h:inputText value="#{createIncomingBillRecordManagedBean.incomingBillEntity.totalDue}"/>
                            <h:outputText value="Due Date: "/>
                            <p:calendar value="#{createIncomingBillRecordManagedBean.incomingBillEntity.dueDate}" pattern="yyyy-MM-dd"/>

                        </h:panelGrid>
                        <p:commandButton style="margin-top:50px;" value="Create" ajax="true" update="growl" action="#{createIncomingBillRecordManagedBean.createIncomingBill}"/>
                        </div>
                    </p:panel>   
                </h:form>    
            </ui:define>


        </ui:composition>

    </body>
</html>
